//
//  TMDataStatistics.h
//  TMDataStatisticsSDK
//
//  Created by rxk on 2020/10/29.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@protocol TMDataStatisticsListener <NSObject>

@optional
/**
 开启debug模式
 */
- (void)tmds_startDebug;

/*!
 @method            tm_addPlayEventWithpProgramName:programID:programType:beginTime:endTime:
 @abstract          添加播放统计事件.
 @param             programName 节目名称.
 @param             programID 节目ID.
 @param             programType 节目类型：2：电视播放  3：广播播放.
 @param             beginTime 开始时间.
 @param             endTime 结束时间.
 @param             userCode 用户唯一标识.
 */
- (void)tmds_addPlayEventWithpProgramName:(NSString *__nullable)programName
                               programID:(NSString *__nullable)programID
                             programType:(int)programType
                               beginTime:(long)beginTime
                                 endTime:(long)endTime
                                 userCode:(NSString *__nullable)userCode;



@end


@interface TMDataStatistics : NSObject

+ (instancetype)sharedInstance;
- (void)addListener:(id<TMDataStatisticsListener>)listener;
- (void)removeListener:(id<TMDataStatisticsListener>)listener;



/**
 开启debug模式
 */
+ (void)startDebug;


/*!
 @method            tm_addPlayEventWithpProgramName:programID:programType:beginTime:endTime:
 @abstract          添加播放统计事件.
 @param             programName 节目名称.
 @param             programID 节目ID.
 @param             programType 节目类型：2：电视播放  3：广播播放.
 @param             beginTime 开始时间.
 @param             endTime 结束时间.
 @param             userCode 用户唯一标识.
 */
+ (void)tm_addPlayEventWithpProgramName:(NSString *__nullable)programName
                               programID:(NSString *__nullable)programID
                             programType:(int)programType
                               beginTime:(long)beginTime
                                 endTime:(long)endTime
                               userCode:(NSString *__nullable)userCode;
@end

NS_ASSUME_NONNULL_END
